<main>
    <section class="article-list">
    {{range .list}}
        <article>
            <h2>
                {{if eq $.rewrite "true"}}
                    <a href="/{{$.rule}}/{{.Name}}.html">{{.Title}}</a>
                {{else}}
                    <a href="/{{$.rule}}/{{.Name}}">{{.Title}}</a>
                {{end}}
            </h2>
            <div class="excerpt">
                <p>{{with $summary := markdown .Summary}}
            {{str2html $summary }}
            {{end}}</p>
            </div>
            <div class="meta">
                <span class="item"><i class="iconfont icon-calendar"></i><time
                        datetime="{{tsc .Renew false}}">{{tsc .Renew false}}</time></span>
                <span class="item"><i class="iconfont icon-crown"></i><a href="/category/{{category .Cid "key"}}"
                                                                         class="">{{category .Cid "name"}}</a></span>
                <span class="item"><i class="iconfont icon-tag"></i>
                     {{if eq $.rewrite "true"}}
                         <a href="/{{$.rule}}/{{.Name}}.html#comments">{{comment .Id}} 评</a>
                     {{else}}
                         <a href="/{{$.rule}}/{{.Name}}#comments">{{comment .Id}} 评</a>
                     {{end}}
                </span>
            </div>
        </article>
    {{end}}
    </section>
    <section class="list-pager">
    {{if gt .paging.PageCount 1}}
    {{if eq $.page 1}}
        <a href="?page={{calc $.page 1 "+"}}" class="next">下一页<i
                class="iconfont icon-right"></i></a>
    {{else if eq $.page $.paging.PageCount}}
        <a href="?page={{calc $.page 1 "-"}}" class="prev"><i
                class="iconfont icon-left"></i>上一页</a>
    {{else}}
        <a href="?page={{calc $.page 1 "-"}}" class="prev"><i
                class="iconfont icon-left"></i>上一页</a>
        <a href="?page={{calc $.page 1 "+"}}" class="next">下一页<i
                class="iconfont icon-right"></i></a>
    {{end}}
    {{end}}
        <div class="clear">
        </div>
    </section>
</main>
</div>
